function getWeather() {
    var cityName = $("#cityName").val();
    if (cityName==undefined || cityName == "") {
        AlertDialog.show(AlertType.alertDanger,{"info":"请输入城市！"});
        return;
    }
    var url = DomainName + "/getWeather";
    var data = "cityName=" + cityName;
     $.ajax({
            url: url,
            type: "post",
            cache: false,
            timeout: 60*1000,
            data: data,
            dataType:"json",
            success: function(data) {
              console.info(data);
              showWeather(data);
            },
            error: function() {
                AlertDialog.show(AlertType.alertDanger,{"info":"查询失败"});
            }
        });
}

function showWeather(data){
    $("#weatherInfo").html(createTemplate("Weather", data.data[1]));
}

